<!DOCTYPE html> 
<html>
	<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1"> 
	<title>jQuery Mobile Framework - Theming Toolbars</title> 
	<link rel="stylesheet"  href="../../css/themes/default/jquery.mobile-1.1.1.css" />  
	<link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>

	<script src="../../js/jquery.js"></script>
	<script src="../../docs/_assets/js/jqm-docs.js"></script>
	<script src="../../js/jquery.mobile-1.1.1.js"></script>

</head> 
<body> 

	<div data-role="page" class="type-interior">

		<div data-role="header" data-theme="f">
		<h1>Bar theming </h1>
		<a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse">Home</a>
		<a href="../nav.html" data-icon="search" data-iconpos="notext" data-rel="dialog" data-transition="fade">Search</a>
	</div>
	

	<div data-role="content">
		<div class="content-primary">	
		<p>Both the header and footer bars will be styled by default with the theme's "a" color swatch (black in the default theme) because these bars are typically primary in the visual hierarchy of a page. </p>
		
			
		<h2>Theming headers and footers</h2>
		<p>To set the header or footer bars to a different color in your theme, add the <code> data-theme</code> attribute and specify the letter of the theme swatch (a, b, c, etc.). For example, this will set the bar to swatch "b" (blue in the default theme):</p> 

<div class="highlight"> 
<pre>
<span class="nt">&lt;div</span> <span class="na">data-role=</span><span class="s">"header"</span> <strong><span class="na">data-theme=</span><span class="s">"b"</span></strong><span class="nt">&gt;</span> 
	<span class="nt">&lt;h1&gt;</span>Page Title<span class="nt">&lt;/h1&gt;</span> 
<span class="nt">&lt;/div&gt;</span> 
</pre> 
</div>

		
		<h2>Theming buttons in toolbars</h2>

		<p>Any link added inside the header block will be automatically styled as a button that matches the color of the bar's theme swatch. To make a button stand out as a primary call to action, the <code> data-theme</code> attribute can be used to specify a contrasting button color from a different theme swatch. For example, if we set the header to theme "c" (light gray), both buttons would be styled as the "c" button by default. If we wanted the Save button to visually pop, we can override the color by setting the <code> data-theme</code> attribute to "b" (blue in our default theme) on the Save button's anchor.</p> 

<div class="highlight"> 
<pre>
<span class="nt">&lt;a</span> <span class="na">href=</span><span class="s">"add-user.php"</span> <strong><span class="na">data-theme=</span><span class="s">"b"</span></strong><span class="nt">&gt;</span>Save<span class="nt">&lt;/a&gt;</span> 
</pre> 
</div> 
			

		
		<h2>Theme variations</h2>
		<p>This is a demo of the variation that can be achieved by tweaking the theme swatches and buttons inside the headers and footers.</p>
		<h3>Headers</h3>

		
		<div data-role="header">
			<h1>Bar swatch "a"</h1>
			<a href="index.html" data-icon="plus" data-theme="c">New</a>
		</div>
		
		<div data-role="header">
			<a href="index.html" data-icon="delete" iconpos="notext">Cancel</a>
			<h1>Bar swatch "a"</h1>
			<a href="index.html" data-icon="arrow-r" data-iconpos="right" data-theme="b">Save</a>
		</div>

		<div data-role="header" data-theme="b">
			<h1>Bar swatch "b"</h1>
			<a href="index.html" data-icon="plus" data-theme="a">New</a>
		</div>

		<div data-role="header" data-theme="b">
			<a href="index.html" data-icon="delete" iconpos="notext">Cancel</a>
			<h1>Bar swatch "b"</h1>
			<a href="index.html" data-icon="arrow-r" data-iconpos="right" data-theme="d">Save</a>
		</div>

		<div data-role="header" data-theme="c">
			<h1>Bar swatch "c"</h1>
			<a href="index.html" data-icon="plus" data-theme="a">New</a>
		</div>

		<div data-role="header" data-theme="c">
			<a href="index.html" data-icon="delete" iconpos="notext">Cancel</a>
			<h1>Bar swatch "c"</h1>
			<a href="index.html" data-icon="arrow-r" data-iconpos="right" data-theme="b">Save</a>
		</div>

		<div data-role="header" data-theme="d">
			<h1>Bar swatch "d"</h1>
			<a href="index.html" data-icon="plus" data-theme="a">New</a>
		</div>

		<div data-role="header" data-theme="d">
			<a href="index.html" data-icon="delete" iconpos="notext">Cancel</a>
			<h1>Bar swatch "d"</h1>
			<a href="index.html" data-icon="arrow-r" data-iconpos="right" data-theme="b">Save</a>
		</div>

		<div data-role="header" data-theme="e">
			<h1>Bar swatch "e"</h1>
			<a href="index.html" data-icon="plus" data-theme="a">New</a>
		</div>

		<div data-role="header" data-theme="e">
			<a href="index.html" data-icon="delete" iconpos="notext">Cancel</a>
			<h1>Bar swatch "e"</h1>
			<a href="index.html" data-icon="arrow-r" data-iconpos="right" data-theme="b">Save</a>
		</div>

    <h3>Footers</h3>
	<p>These are examples of a footer with link buttons inside. Note that footers do not have the same prescriptive markup conventions as headers with button slots so use <a href="../content/content-grids.html">layout grids</a> or custom styles to achieve the design you want.</p>
	

	
	<div data-role="footer" data-theme="a">
            <a href="index.html" data-role="button" data-icon="arrow-l" data-iconpos="right">left</a>
            <a href="index.html" data-role="button" data-icon="arrow-r" data-iconpos="right">right</a>
            <a href="index.html" data-role="button" data-icon="arrow-u" data-iconpos="right">up</a>
            <a href="index.html" data-role="button" data-icon="arrow-d" data-iconpos="right">down</a>
	</div>
    
	<div data-role="footer" data-theme="b">
            <a href="index.html" data-role="button" data-icon="arrow-l" data-iconpos="right">left</a>
            <a href="index.html" data-role="button" data-icon="arrow-r" data-iconpos="right">right</a>
            <a href="index.html" data-role="button" data-icon="arrow-u" data-iconpos="right">up</a>
            <a href="index.html" data-role="button" data-icon="arrow-d" data-iconpos="right">down</a>
	</div>
    
    <div data-role="footer" data-theme="c">
            <a href="index.html" data-role="button" data-icon="arrow-l" data-iconpos="right">left</a>
            <a href="index.html" data-role="button" data-icon="arrow-r" data-iconpos="right">right</a>
            <a href="index.html" data-role="button" data-icon="arrow-u" data-iconpos="right">up</a>
            <a href="index.html" data-role="button" data-icon="arrow-d" data-iconpos="right">down</a>
	</div>
    
    	<div data-role="footer" data-theme="d">
            <a href="index.html" data-role="button" data-icon="arrow-l" data-iconpos="right">left</a>
            <a href="index.html" data-role="button" data-icon="arrow-r" data-iconpos="right">right</a>
            <a href="index.html" data-role="button" data-icon="arrow-u" data-iconpos="right">up</a>
            <a href="index.html" data-role="button" data-icon="arrow-d" data-iconpos="right">down</a>
		</div>
    
    	<div data-role="footer" data-theme="e">
            <a href="index.html" data-role="button" data-icon="arrow-l" data-iconpos="right">left</a>
            <a href="index.html" data-role="button" data-icon="arrow-r" data-iconpos="right">right</a>
            <a href="index.html" data-role="button" data-icon="arrow-u" data-iconpos="right">up</a>
            <a href="index.html" data-role="button" data-icon="arrow-d" data-iconpos="right">down</a>
		</div>


				</div><!--/content-primary -->		

				<div class="content-secondary">

					<div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">

							<h3>More in this section</h3>

							<ul data-role="listview" data-theme="c" data-dividertheme="d">

								<li data-role="list-divider">Toolbars</li>
								<li><a href="docs-bars.html">Toolbar basics</a></li>
								<li><a href="docs-headers.html">Header bars</a></li>
								<li><a href="docs-footers.html">Footer bars</a></li>
								<li><a href="docs-navbar.html">Navbars</a></li>
								<li><a href="bars-fixed.html">Fixed positioning</a></li>
								<li><a href="footer-persist-a.html">Persistent toolbars</a></li>
								<li data-theme="a"><a href="bars-themes.html">Theming toolbars</a></li>

							</ul>
					</div>
				</div>		

			</div><!-- /content -->

			<div data-role="footer" class="footer-docs" data-theme="c">
					<p>&copy; 2012 jQuery Foundation and other contributors</p>
			</div>

			</div><!-- /page -->

			</body>
			</html>